public class findMin {
    public int findMin(int[] nums) {
        int low = 0,high = nums.length - 1;
        while(low < high){
            int mid = (high - low - 1) / 2 + low;
            if(nums[mid] > nums[high]){
                low = mid + 1;
            }else{
                high = mid;
            }
        }
        return nums[low];
    }
}
